<TeXmacs|1.99.16>

<project|rehash.tm>

<style|tmmanual>

<\body>
  aria2<\footnote>
    Website: <hlink|https://aria2.github.io/manual/en/html/|>
  </footnote> supports downloading via multiple protocols, both client-server
  protocols such as <abbr|http> and <abbr|https>, but also a P2P file-sharing
  protocol BitTorrent. It may be useful to teach aria2 how to communicate
  with GNUnet FS (and perhaps IPFS and Dat as well), and then rely on aria2
  for everything. Some points in favor of aria2:

  <\itemize>
    <item>The \<#2018\>classical\<#2019\> protocols <abbr|http>,
    <abbr|https>, <abbr|ftp> and <samp|sftp> are supported. This seems to
    cover all possible locations of source code in Guix (except from
    version-control repositories), and all protocols used for accessing
    substitute servers.

    <item>P2P considerations aren't unknown to aria2, as it functions as a
    BitTorrent client.

    <item>aria2 seems to be used in the wild, and has been around for a
    while. Most complications (except those specific to rehash) probably are
    already worked out.
  </itemize>

  <todo|we should probably use the Metalink format, possibly with some
  non-standard extensions for GNUnet and Nix hashes, if the REST API will be
  implemented>

  There are some complications as well though:

  <\itemize>
    <item>aria2 doesn't know GNUnet FS.

    <item>aria2 needs to know what to download in advance, as an <abbr|URL>
    or Torrent as appropriate. It cannot magically convert, say, a sha256
    hash to a Torrent.

    <item>The previous point could be solved by teaching aria2 about rehash.
    However, a complication arises again: aria2 assumes each URL serves
    correct content (even though i is trivial to insert bad hashes into
    rehash), without retrying if this assumption is proved false, and won't
    retry if this results in a corrupted file.

    (aria2 has an option <samp|\Ucheck-integrity>, but doesn't detect which
    source URL was bad)

    <todo|Some decentralised system for checking the validity of mappings
    would be appreciated, though the author presumes by the time this would
    become necessary, rehash is obsolete>

    <item>aria2 cannot be used for uploading.

    <item>aria2 does not function as a mirror.
  </itemize>
</body>

<\initial>
  <\collection>
    <associate|save-aux|false>
  </collection>
</initial>